/**
 * \* Created with IntelliJ IDEA.
 * \* User: Administrator
 * \* Date: 2022/2/16
 * \* Time: 15:52
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
public class TestHeap {
    public  int[] elem;
    public int useSize;
    public TestHeap(){
        this.elem = new int[10];
    }

    /**
     * 向下调整函数实现
     * @param parent 每棵树的根节点
     * @param len 每棵树的调整结束位置
     */
    public void shiftDowm(int parent, int len){
        int child = 2*parent+1;
        while (child <len){
            if()
        }
    }

    public void createHeap(int[] array){
        for(int i = 0;i<array.length ;i++){
            elem[i] = array[i];
            useSize++;
        }
        for(int parent = (useSize -1 -1 )/2; parent >= 0 ; parent--){
            //调整
            shiftDowm(parent,useSize);
        }
    }
}
